package com.vf.admin.miaodong.service.impl;

import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.dao.AfterRoomDao;
import com.vf.admin.miaodong.entity.AppRoom;
import com.vf.admin.miaodong.service.AfterRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 房间
 */
@Service
public class AfterRoomServiceImpl implements AfterRoomService {
    @Autowired
    AfterRoomDao afterRoomDao;

    /**
     * 详情
     */
    @Override
    public AppRoom get(Integer id) {
        return afterRoomDao.get(id);
    }
    /**
     * 详情
     */
    @Override
    public AppRoom getRoomcode(Integer roomcode) {
        return afterRoomDao.getRoomcode(roomcode);
    }

    /**
     * 添加/修改
     */
    @Override
    public void save(AppRoom appRoom) {
        afterRoomDao.save(appRoom);
    }

    /**
     * 删除
     */
    @Override
    public void del(Integer id) {
        afterRoomDao.del(id);
    }

    /**
     * 综合查询
     * @param map
     * @param bean
     */
    @Override
    public List<AppRoom> findList(Map<String, Object> map, SplitPageBean bean) {
        return afterRoomDao.findList(map,bean);
    }

    /**
     * 根据房间CODE查询房间
     * @param roomcode
     * @param splitPage
     * @return
     */
    @Override
    public List<AppRoom> selectRoomByCode(String roomcode, SplitPageBean splitPage) {
        return afterRoomDao.selectRoomByCode(roomcode, splitPage);
    }
}
